# Copyright (c) 2024, lanlian and contributors
# For license information, please see license.txt

import frappe
from frappe.model.document import Document


class EMSAccidentStatement(Document):
	def on_submit(self):
		if frappe.db.exists({"doctype": 'EMS Accident Record', "name": self.ems_accident_record, "docstatus": 1}):
			frappe.db.set_value('EMS Accident Record', self.ems_accident_record, {'Finished': 1})
		else:
			pass